#pragma once
#include"RBTree.h"
namespace celia
{
	template<class T>
	class MySet
	{
		struct KeyOfT
		{
			const T& operator()(const T& data)
			{
				return data;
			}
		};
	public:
		typedef typename RBTree<T, const T, KeyOfT>::Iterator iterator;
		typedef typename RBTree<T, const T, KeyOfT>::const_Iterator const_iterator;

		iterator begin()
		{
			return _t.begin();
		}
		iterator end()
		{
			return _t.end();
		}
		const_iterator begin() const
		{
			return _t.begin();
		}
		const_iterator end() const
		{
			return _t.end();
		}

		pair<iterator, bool> Insert(const T& t)
		{
			return _t.Insert(t);
		}
	private:
		RBTree<T, const T, KeyOfT> _t;
	};
}